package androidgame.teslawars.game;

import androidgame.teslawars.game.Level.Player;
import androidgame.teslawars.game.Tile.Terrain;


public class FootSoldier extends Unit {
	
	public FootSoldier (int x, int y, Player player) {
		health = 10;
		armor = 0;
		moveRange = 3;
		attackRange = 2;
		attackDamage = 5;
		unitName = UnitName.FOOTSOLDIER;	
		this.x = x;
		this.y = y;
		canMove = true;
		this.player = player;
		canAttack = false;
	}
	
	@Override
	public int attack(Unit target) {
		int damage = attackDamage - target.armor;
		return damage;
	}
	
	@Override
	public int moveCost(Tile tile) {
		Terrain terrain = tile.terrain;
		if (terrain == Terrain.MOUNTAIN) 
			return 2;
		return 1;   //need to implement specific values
	}
	
	@Override
	public int getBonusDefenseValue(Tile tile){
		return tile.defenseRating;
	}

}
